# Contributor: Maarten van Gompel <proycon@anaproy.nl>
# Maintainer: Anjandev Momi <anjan@momi.ca>
pkgname=mnc
pkgver=0.4
pkgrel=20
arch="all"
url="https://git.sr.ht/~anjan/mnc"
pkgdesc="get the time in seconds to next cron job"
source="$pkgname-$pkgver.tar.gz::https://git.sr.ht/~anjan/mnc/archive/$pkgver.tar.gz"
license="Unlicense"
makedepends="go binutils"
options="!check" # no testsuite in upstream

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
export GOFLAGS="$GOFLAGS -modcacherw"

build() {
	go build mnc.go
	strip mnc
}

package() {
	mkdir -p "$pkgdir"/usr/bin
	install mnc "$pkgdir"/usr/bin
}

sha512sums="
22f6ce2a6da34ce0d70fb9e6608e1cbd14ac1dd16e38700a01c627b3ea4d43c4492db528708b9e6efc1b018ef8091434da43f3641e3f34648a68239c26bc249d  mnc-0.4.tar.gz
"
